home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / fw30int7.lha / Install FinalWriter-030 < prev    next >
Text File  |  1995-07-05  |  2KB  |  91 lines

  1. ; $VER: FinalWriter-030_Install 1.9 (5.7.95)
  2.  
  3. (set version "3.0")
  4.  
  5. (onerror (exit (quiet)))
  6.  
  7. (message
  8.     "\n\nFinalWriter " version "-030 International"
  9.     "\nCopyright 1995 Martin Berndt"
  10.     "\n\n\nThis Patch is SHAREWARE !"
  11.     "\n\nPlease read the \"ReadMe.txt\" file."
  12. )
  13.  
  14. (set @default-dest
  15.     (askdir
  16.         (prompt "Where is your FinalWriter Drawer?")
  17.         (help @askfile-help)
  18.         (default "SYS:FinalWriter")
  19.         (newpath)
  20.     )
  21. )
  22.  
  23. (set language
  24.     (askchoice
  25.         (prompt "Select Language")
  26.         (help @askchoice-help)
  27.         (choices "US1  23-Nov-94 (American English)"
  28.              "US2  14-Dec-94 (American English)"
  29.              "US3   3-Jan-95 (American English)"
  30.              "US4  13-Mar-95 (American English)"
  31.              "GB1  23-Nov-94 (British English)"
  32.              "GB2  14-Dec-94 (British English)"
  33.              "GB3   3-Jan-95 (British English)"
  34.              "GER1  7-Dec-94 (German)"
  35.              "GER2 14-Dec-94 (German)"
  36.              "GER3  3-Jan-95 (German)"
  37.              "GER4 13-Mar-95 (German)")
  38.     )
  39. )
  40.  
  41. (set backup
  42.     (askoptions
  43.         (prompt "Options")
  44.         (help @askoptions-help)
  45.         (choices "Create Backup Files")
  46.     )
  47. )
  48.  
  49. (set n 0)
  50. (set percent 0)
  51.  
  52. (while (set name (select n "FinalWriter" "swpost.library" "swshell.library"
  53.                "cachemap.library" "qfont.library" "")) (
  54.     (set n (+ n 1))
  55.     (complete percent)
  56.     (if (= n 1)
  57.         (set file name)
  58.         (set file ("FWLibs/%s" name))
  59.     )
  60.     (set newfile (tackon @default-dest file))
  61.     (set oldfile (cat newfile ".bak"))
  62.     (if (= (exists newfile) 0)
  63.         (abort name " not found!")
  64.     )
  65.     (rename newfile oldfile)
  66.     (if (< n 4) (
  67.         (if (= n 1)
  68.             (set name (cat name (select language "US1" "US2" "US3" "US4" "GB1" "GB2" "GB3" "GER1" "GER2" "GER3" "GER4")))
  69.         )
  70.         (if (= n 3)
  71.             (set name (cat name (if (= (bitand (getversion oldfile) 65535) 4) ("1") ("2"))))
  72.         )
  73.         (working "\n\n" newfile)
  74.         (if (<> (run ("spatch \"-o%s\" \"-p%s.pch\" \"%s\"" newfile name oldfile)) 0) (
  75.             (rename oldfile newfile)
  76.             (abort "Wrong Version!")
  77.         ))
  78.         (set percent (+ percent 30))
  79.     ) (
  80.         (copyfiles
  81.             (prompt "Copying " name)
  82.             (help @copyfiles-help)
  83.             (source name)
  84.             (dest (tackon @default-dest "FWLibs"))
  85.             (optional "force" "askuser")
  86.         )
  87.         (set percent (+ percent 5))
  88.     ))
  89.     (if (= backup 0) (delete oldfile))
  90. ))
  91.